package com.manage.pojo.entity.ai;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.manage.pojo.entity.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 会话对象 cm_ai_sessions
 *
 * @author ruoyi
 * @date 2025-10-05
 */
@Data
@TableName("cm_ai_sessions")
public class CmAiSessions extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId
    private Long id;

    /** 外部唯一id */
    private String publicId;

    /** 用户id */
    private Long userId;

    /** 会话标题 */
    private String title;

    /** 会话状态：1-活跃，0-关闭 */
    private String status;

    /** 会话关闭时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date closedTime;

    /**创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("publicId", getPublicId())
            .append("userId", getUserId())
            .append("title", getTitle())
            .append("status", getStatus())
            .append("closedTime", getClosedTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
